import launch
import launch_ros

def generate_launch_description():
    '''产生launch描述'''
    # 声明launch参数
    action_declare_arg_background_g= launch.actions.DeclareLaunchArgument('launch_arg_bg',default_value="100")
    turtlesim_node=launch_ros.actions.Node(
        package='turtlesim',
        executable='turtlesim_node',
        parameters=[{'background_g':launch.substitutions.LaunchConfiguration('launch_arg_bg',default="100")}],
        output='screen'
    )

    turtir_control=launch_ros.actions.Node(
        package='demo_cpp_service',
        executable='turtir_control',
        output='screen'
    )

    partol_client=launch_ros.actions.Node(
        package='demo_cpp_service',
        executable='partol_client',
        output='screen'
    )

    return launch.LaunchDescription([
        action_declare_arg_background_g,
        turtlesim_node,
        turtir_control,
        partol_client
    ])